
 /**
 * TreeNode.java.java.
 * User: BrianChen Date: 2012-7-31 下午01:53:33
 *
 * Copyright (c) 2009 Hewlett-Packard Development Company, L.P.
 * All rights reserved.
 */
package com.collapsar.core.menu;

import java.util.ArrayList;
import java.util.List;

import com.collapsar.core.security.model.Authority;

/**
 * <pre>
 * REVISIONS: 
 * Version 	Date 		Author 			Description
 * ------------------------------------------------------------------- 
 * 1.0 		2012-7-31 	BrianChen 	1. Created this class. 
 * </pre>
 * 
 * @author BrianChen
 * @date 2012-7-31 下午01:53:33
 * @version 1.0
 * @see
 * 
 */
public class TreeNode {
	private String code = null;
	private String name = null;
	private List<TreeNode> children = new ArrayList<TreeNode>();
	
	public TreeNode(String code, String name){
		this.code = code;
		this.name = name;
	}
	public TreeNode(Authority auth){
		this.code = auth.getCode();
		this.name = auth.getName();
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public List<TreeNode> getChildren() {
		return children;
	}
	public void setChildren(List<TreeNode> children) {
		this.children = children;
	}
	
	
}

